import Router from 'koa-router'
import routerConfigArr from './router.config'

// 路由
const routers = new Router()

// 路由方法挂载
routerConfigArr.forEach(item => routers[item.method](item.api, ...item.callback))

// 导出路由
export default routers